Inji 214: Setup Native module for storing keys in hardware key store android#1
Open
tilak-puli wants to merge 31 commits into
Open
Inji 214: Setup Native module for storing keys in hardware key store android#1tilak-puli wants to merge 31 commits into
tilak-puli wants to merge 31 commits into
Conversation
…key and other minor refactoring
…ing spongy castle
…gnature return type
| ] | ||
| }, | ||
| "dependencies": { | ||
| "react-native-secure-keystore": "file:.yalc/react-native-secure-keystore" |
Author
There was a problem hiding this comment.
yes Krishna. Got added by mistake. I will remove
|
|
||
| return KeyGenParameterSpec.Builder(alias, purposes) | ||
| .setKeySize(KEY_PAIR_KEY_SIZE) | ||
| .setDigests(DIGEST_SHA256, DIGEST_SHA512, DIGEST_SHA1) |
There was a problem hiding this comment.
I don't think we should support SHA1 digest
|
|
||
| override fun encryptData(alias: String, data: String): String { | ||
| Log.i(logTag, ks.aliases().toList().toString()) | ||
| val key = getKeyOrThrow(alias) |
There was a problem hiding this comment.
How are exceptions translated to RN layer?
| } | ||
|
|
||
| override fun generateHmacSha(data: String): ByteArray { | ||
| val messageDigest = MessageDigest.getInstance(HMAC_ALGORITHM) |
There was a problem hiding this comment.
I hope we know that HMAC SHA256 is different from SHA256. This implementation is simply calculating SHA256 but not HMAC SHA256. HMAC would require a AES key additionally.
…add biometric auth for encryption and decryption TODO: Handle Keystore -28 exception
… when biometric authentication prompt is displayed
…s invalid due to biometric
…n with AES algorith
tilak-puli
added a commit
that referenced
this pull request
Nov 9, 2023
Inji 214: Create Hardware backed keystore in Android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://mosip.atlassian.net/browse/INJI-214